<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>悦动普拉提 - 专业普拉提工作室</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        :root {
            --primary-color: #6a8d92;
            --secondary-color: #f4f4f4;
            --accent-color: #f8b195;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            padding-bottom: 70px;
            background-color: #f9f9f9;
        }

        .navbar-brand {
            font-weight: 600;
            color: var(--primary-color);
        }

        .nav-link.active {
            color: var(--primary-color) !important;
            font-weight: 500;
        }

        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-outline-primary {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-outline-primary:hover {
            background-color: var(--primary-color);
            color: white;
        }

        .card {
            border-radius: 12px;
            overflow: hidden;
            border: none;
            box-shadow: 0 4px 8px rgba(0,0,0,0.05);
            transition: transform 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
        }

        .course-card .card-img-top {
            height: 150px;
            object-fit: cover;
        }

        .coach-card .card-img-top {
            height: 200px;
            object-fit: cover;
        }

        .badge-course {
            background-color: var(--accent-color);
            color: white;
        }

        .schedule-day {
            border-radius: 10px;
            background-color: white;
            padding: 15px;
            margin-bottom: 15px;
        }

        .class-slot {
            border-left: 4px solid var(--primary-color);
            padding: 10px;
            margin-bottom: 10px;
            background-color: var(--secondary-color);
            border-radius: 0 8px 8px 0;
        }

        .class-slot.booked {
            border-left-color: var(--accent-color);
        }

        .tab-content {
            padding: 15px 0;
        }

        .profile-img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .vip-card {
            background: linear-gradient(135deg, #6a8d92, #8fb3b8);
            color: white;
            border-radius: 15px;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }

        .vip-card::before {
            content: "";
            position: absolute;
            top: -50px;
            right: -50px;
            width: 150px;
            height: 150px;
            background-color: rgba(255,255,255,0.1);
            border-radius: 50%;
        }

        .vip-card-premium {
            background: linear-gradient(135deg, #f8b195, #f67280);
        }

        .bottom-navbar {
            position: fixed;
            bottom: 0;
            width: 100%;
            background-color: white;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
            z-index: 1000;
        }

        .bottom-navbar .nav-link {
            color: #666;
            text-align: center;
            font-size: 12px;
        }

        .bottom-navbar .nav-link.active {
            color: var(--primary-color);
        }

        .bottom-navbar .bi {
            font-size: 20px;
            display: block;
            margin-bottom: 2px;
        }

        .modal-header {
            border-bottom: none;
        }

        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.25rem rgba(106, 141, 146, 0.25);
        }

        .search-bar {
            position: relative;
        }

        .search-bar .form-control {
            padding-left: 40px;
            border-radius: 20px;
            border: 1px solid #ddd;
        }

        .search-bar .bi {
            position: absolute;
            left: 15px;
            top: 10px;
            color: #999;
        }

        .filter-buttons .btn {
            margin-right: 5px;
            margin-bottom: 5px;
            border-radius: 20px;
            font-size: 14px;
        }

        #content-container {
            min-height: calc(100vh - 120px);
        }


        .class-slot.booked {
            border-left: 4px solid #28a745;
            background-color: rgba(40, 167, 69, 0.08);
        }

        .class-slot.booked:hover {
            background-color: rgba(40, 167, 69, 0.12);
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
    <div class="container">
        <a class="navbar-brand" href="#">
            <i class="bi bi-flower1 me-2"></i>悦动普拉提
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ms-auto">
                <li class="nav-item">
                    <a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#loginModal">登录</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#registerModal">注册</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<!-- 主内容容器 -->
<div class="container mt-4 mb-5" id="content-container">
    <!-- 内容将通过JavaScript动态加载 -->
</div>

<!-- 底部导航栏 -->
<nav class="navbar bottom-navbar">
    <div class="container">
        <ul class="nav w-100 justify-content-around">
            <li class="nav-item">
                <a class="nav-link active" href="#" data-page="home">
                    <i class="bi bi-house-door"></i>
                    <span>首页</span>
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#" data-page="courses">
                    <i class="bi bi-list-check"></i>
                    <span>课程</span>
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#" data-page="schedule">
                    <i class="bi bi-calendar-plus"></i>
                    <span>预约</span>
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#" data-page="member">
                    <i class="bi bi-person"></i>
                    <span>我的</span>
                </a>
            </li>
        </ul>
    </div>
</nav>

<!-- 登录模态框 -->
<div class="modal fade" id="loginModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">会员登录</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="mb-3">
                        <label class="form-label">手机号</label>
                        <input type="tel" class="form-control" placeholder="请输入手机号">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">密码</label>
                        <input type="password" class="form-control" placeholder="请输入密码">
                    </div>
                    <div class="mb-3 form-check">
                        <input type="checkbox" class="form-check-input" id="rememberMe">
                        <label class="form-check-label" for="rememberMe">记住我</label>
                    </div>
                    <button type="submit" class="btn btn-primary w-100 mb-3">登录</button>
                    <div class="text-center">
                        <a href="#" class="text-muted small">忘记密码?</a>
                    </div>
                </form>
            </div>
            <div class="modal-footer justify-content-center">
                <span class="text-muted me-2">还没有账号?</span>
                <a href="#" class="text-primary" data-bs-toggle="modal" data-bs-target="#registerModal" data-bs-dismiss="modal">立即注册</a>
            </div>
        </div>
    </div>
</div>

<!-- 注册模态框 -->
<div class="modal fade" id="registerModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">会员注册</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="mb-3">
                        <label class="form-label">手机号</label>
                        <input type="tel" class="form-control" placeholder="请输入手机号">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">验证码</label>
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="请输入验证码">
                            <button class="btn btn-outline-secondary" type="button">获取验证码</button>
                        </div>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">密码</label>
                        <input type="password" class="form-control" placeholder="请输入密码(6-20位)">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">确认密码</label>
                        <input type="password" class="form-control" placeholder="请再次输入密码">
                    </div>
                    <button type="submit" class="btn btn-primary w-100">注册</button>
                </form>
            </div>
            <div class="modal-footer justify-content-center">
                <span class="text-muted me-2">已有账号?</span>
                <a href="#" class="text-primary" data-bs-toggle="modal" data-bs-target="#loginModal" data-bs-dismiss="modal">立即登录</a>
            </div>
        </div>
    </div>
</div>

<!-- VIP卡购买模态框 -->
<div class="modal fade" id="vipModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">选择会员卡</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div class="vip-card mb-3">
                    <h6>基础会员卡</h6>
                    <p class="small">有效期: 1个月</p>
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h4 class="mb-0">¥999</h4>
                            <small>8节团课</small>
                        </div>
                        <button class="btn btn-sm btn-light">选择</button>
                    </div>
                </div>

                <div class="vip-card mb-3">
                    <h6>黄金会员卡</h6>
                    <p class="small">有效期: 3个月</p>
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h4 class="mb-0">¥2,599</h4>
                            <small>12节团课 + 2节私教</small>
                        </div>
                        <button class="btn btn-sm btn-light">选择</button>
                    </div>
                </div>

                <div class="vip-card vip-card-premium mb-3">
                    <h6>铂金会员卡</h6>
                    <p class="small">有效期: 6个月</p>
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h4 class="mb-0">¥4,999</h4>
                            <small>24节团课 + 4节私教</small>
                        </div>
                        <button class="btn btn-sm btn-light">选择</button>
                    </div>
                </div>

                <div class="form-check mb-3">
                    <input class="form-check-input" type="checkbox" id="agreeTerms">
                    <label class="form-check-label small" for="agreeTerms">
                        我已阅读并同意《会员协议》和《退款政策》
                    </label>
                </div>

                <button class="btn btn-primary w-100">立即购买</button>
            </div>
        </div>
    </div>
</div>

<!-- 课程详情模态框 -->
<div class="modal fade" id="courseDetailModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">课程详情</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <img src="https://images.unsplash.com/photo-1545205597-3d9d02c29597?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" class="img-fluid rounded mb-3" alt="课程图片">
                <h5>核心普拉提</h5>
                <div class="d-flex mb-3">
                    <span class="badge bg-primary me-2">核心训练</span>
                    <span class="badge bg-secondary">中级</span>
                </div>

                <div class="mb-3">
                    <h6>课程介绍</h6>
                    <p>本课程专注于核心肌群的训练，通过一系列普拉提动作增强腹部、背部和骨盆底肌肉的力量和稳定性，改善体态，缓解腰背疼痛。</p>
                </div>

                <div class="row mb-3">
                    <div class="col-6">
                        <h6>时长</h6>
                        <p class="text-muted">45分钟</p>
                    </div>
                    <div class="col-6">
                        <h6>适合人群</h6>
                        <p class="text-muted">所有健身水平</p>
                    </div>
                </div>

                <div class="mb-4">
                    <h6>教练</h6>
                    <div class="d-flex align-items-center">
                        <img src="https://images.unsplash.com/photo-1560250097-0b93528c311a?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=60" class="rounded-circle me-2" width="40" height="40" alt="教练头像">
                        <div>
                            <h6 class="mb-0">张教练</h6>
                            <small class="text-muted">普拉提认证教练 · 5年经验</small>
                        </div>
                    </div>
                </div>

                <button class="btn btn-primary w-100">立即预约</button>
            </div>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
    // 页面加载函数
    async function loadPage(page) {
        try {
            const response = await fetch(`${page}.html`);
            const html = await response.text();
            document.getElementById('content-container').innerHTML = html;

            // 更新底部导航栏活动状态
            document.querySelectorAll('.bottom-navbar .nav-link').forEach(link => {
                link.classList.remove('active');
                if (link.getAttribute('data-page') === page) {
                    link.classList.add('active');
                }
            });

            // 初始化页面特定的JavaScript
            initPageScripts(page);
        } catch (error) {
            console.error('加载页面失败:', error);
        }
    }

    // 初始化页面特定的JavaScript
    function initPageScripts(page) {
        // 公共脚本
        document.querySelectorAll('.course-card').forEach(card => {
            card.addEventListener('click', function() {
                const modal = new bootstrap.Modal(document.getElementById('courseDetailModal'));
                modal.show();
            });
        });

        // 预约按钮点击事件
        document.querySelectorAll('.btn-primary:not(.modal-footer .btn-primary)').forEach(btn => {
            if (btn.textContent.trim() === '预约') {
                btn.addEventListener('click', function(e) {
                    e.stopPropagation();
                    alert('预约成功！');
                });
            }
        });

        // 取消预约按钮点击事件
        document.querySelectorAll('.btn-outline-danger').forEach(btn => {
            btn.addEventListener('click', function(e) {
                e.stopPropagation();
                if (confirm('确定要取消此预约吗？')) {
                    this.closest('.class-slot').remove();
                    alert('已取消预约');
                }
            });
        });

        // 页面特定脚本
        if (page === 'schedule') {
            generateCalendar();
        }
    }

    // 生成日历
    function generateCalendar() {
        const calendarEl = document.getElementById('calendar');
        if (!calendarEl) return;

        const daysInMonth = 31;
        const firstDay = 1; // 假设5月1日是星期一

        // 添加空白格子
        for (let i = 0; i < firstDay; i++) {
            const emptyDay = document.createElement('div');
            emptyDay.style.width = '14%';
            emptyDay.style.height = '40px';
            calendarEl.appendChild(emptyDay);
        }

        // 添加日期
        for (let day = 1; day <= daysInMonth; day++) {
            const dayEl = document.createElement('button');
            dayEl.className = 'btn btn-sm btn-outline-secondary m-1';
            dayEl.style.width = '14%';
            dayEl.style.height = '40px';
            dayEl.textContent = day;

            // 标记今天
            if (day === 15) {
                dayEl.className = 'btn btn-sm btn-primary m-1';
            }

            calendarEl.appendChild(dayEl);
        }
    }

    // 底部导航切换
    document.querySelectorAll('.bottom-navbar .nav-link').forEach(link => {
        link.addEventListener('click', function(e) {
            e.preventDefault();
            const page = this.getAttribute('data-page');
            history.pushState({ page }, '', `#${page}`);
            loadPage(page);
        });
    });

    // 处理浏览器前进/后退
    window.addEventListener('popstate', (event) => {
        const page = event.state?.page || 'home';
        loadPage(page);
    });

    // 初始加载
    document.addEventListener('DOMContentLoaded', () => {
        const hashPage = window.location.hash.substring(1) || 'home';
        loadPage(hashPage);
    });
</script>
</body>
</html>